package net.sx.minemodule.mvp.activities;

import android.os.Bundle;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.homegoods.aroutercomment.ARouterPath;
import com.kedll.library.base.MyBaseFragmentActivity;
import com.kedll.library.mvp.BasePresenter;

import net.sx.minemodule.R;
import net.sx.minemodule.databinding.MineActivityMineExchangePhoneBinding;

/**
 * 换绑手机号
 *
 * @author 11470
 */
@Route(path = ARouterPath.PATH_EXCHANGE_PHONE)
public class MineExchangePhoneActivity extends MyBaseFragmentActivity<MineActivityMineExchangePhoneBinding, BasePresenter> {
    private String phone;

    @Override
    protected int getLayout() {
        return R.layout.mine_activity_mine_exchange_phone;
    }

    @Override
    protected void initEvent() {
        mBinding.tvExchangePhone.setOnClickListener(v -> {
            ARouter.getInstance().build(ARouterPath.PATH_BINDING_NEW_PHONE).navigation();
        });
    }

    @Override
    protected void initData(Bundle savedInstanceState) {
        super.initData(savedInstanceState);
        if (getIntent().getExtras() != null) {
            phone = getIntent().getExtras().getString("phone");
        }
        mBinding.tvCurrentPhone.setText(phone);
//        mBinding.tvCurrentPhoneBinding.setText(phone);
    }

    @Override
    protected void initToolBar(Bundle savedInstanceState) {
        super.initToolBar(savedInstanceState);
        setTitle("换绑手机号");
    }

    @Override
    protected BasePresenter getPresenter() {
        return null;
    }
}
